package com.crowdfunding.controller;

import com.crowdfunding.entity.CrowdFunding;
import com.crowdfunding.entity.CrowdFundingDetail;
import com.crowdfunding.service.CrowdFundingDetailService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@CrossOrigin
@RequestMapping("/crowdfunding/crowdfundingDetail")
public class CrowdFundingDetailController {

    @Autowired
    CrowdFundingDetailService crowdFundingDetailService;


    @GetMapping("/getByCfId")
    @ResponseBody
    @ApiOperation("根据id获取众筹活动的详情列表（包含多张图片）")
    public CrowdFundingDetail getCrowdFundingDetailByCfId(String cfId){
        return crowdFundingDetailService.getDetail(cfId);
    }

}
